﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/FullSite.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ToppingControl.Models.TopCordActModel.TopCordAct_DS>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
   Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
   <div class="float-left">
      <h2>
         Topping Tail Computer</h2>
   </div>
  
   <div class="float-right">
      <div class="float-left">
         <h3>
            Topping NO.
            <%  foreach (var item in Model)
                {
                   int i = 1;
                   if (i == 1) {
                      i = i + 1;
                      Html.Display(item._Topno);
                   }
                   else
                      return;
                }
            %>
         </h3>
      </div>
      <div class="float-left" style="margin-left: 25px;">
         <h3>
            Shift : 1</h3>
      </div>
      <div class="float-left" style="margin-left: 25px;">
         <h3>
            Name :
            <% if (Request.IsAuthenticated)
               { %>
            <%:  User.Identity.Name %>
     
      <% } %> </h3></div>
   </div>
   <div class="float-right" style="margin-right: 25px;">
      <h3>
         Shift : 1</h3>
   </div>
   <div class="float-right" style="margin-right: 25px;">
      <h3>
         Topping NO. 1</h3>
   </div>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="TableContent" runat="server">

      <div class="float-left" style="width: 30%; margin-left:25px;">
   <input type="button" value="EXIT" class="btnFooter shadow" style="height: 75px; width: 220px;"
            onclick="javascript:window.close();" />
      </div>
      <div class="float-left" style="text-align: center; width: 35%">
       <input type="button"  class="btnFooter shadow" value="CARD" id="card" /></div>
      <div class="float-left"  style="text-align: right; width: 30%">
         <input type="button"  class="btnFooter shadow" value="WASTE" id="was" /></div>
 
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MainContent2" runat="server">
   
      <%
         int i = 0;

         foreach (var item in Model)
         {
            i = i + 1;
            string trrow = "rowa";
            if (i % 2 == 0) trrow = "rowb";
            if (i == 1)
            {
               
               trrow = trrow + " actived";
      %>
   <div class="float-left" style="width: 50%; margin-right: 0; margin-left: 25px;">
      <table width="100%" class="fontTB shadow">
      <tr style="display:none;"><td id="prddate"><%: item._Prddate %></td></tr>
      <tr style="display:none;"><td id="topc"><%: item._Topcrdcd %></td></tr>
         <tr class="rowb">
            <td  class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               DATE-SEQ :
            </td>
            <td class="cell" id="itemno">
               <%:  item._Plandt +'-'+  item._Itemno %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Topped Cord :
            </td>
            <td class="cell" id="Topcode">
               <%: item._Topcrdcd %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Manufacturer
            </td>
            <td class="cell" id="customer">
               <%: item._Manufc %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Length (M.)
            </td>
            <td class="cell" id="tirlen">
               <%: item._HLength %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Tire Cord
            </td>
            <td class="cell" id="tirecd">
               <%: item._Tcrdcd %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Tire Cord Lot
            </td>
            <td class="cell" id="tirlt">
               <%: item._Tcrdlot %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Tire Cord Expired
            </td>
            <td class="cell" id="tirexp">
               <%: item._HExp %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Compound
            </td>
            <td class="cell" id="tircom">
               <%: item._Compound %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Compound Lot
            </td>
            <td class="cell" id="comlot">
               <%: item._ComLot %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Compound Pallet
            </td>
            <td class="cell" id="compl">
               <%: item._ComPlt %>
            </td>
         </tr>
         <tr class="rowb">
            <td class="head cell text-right" style="padding: 10px 0px; width: 35%;">
               Compound Expired
            </td>
            <td class="cell" id="comexp">
               <%: item._ComExp %>
            </td>
         </tr>
      </table>
   </div>
   <div style="" class="float-left">
      <table width="95%" class="shadow fontTB" style="margin-left: 25px">
         <tr class="head">
            <td class="cell" style="padding: 10px 5px;">
               Seq
            </td>
            <td class="cell">
               Topped Cord
            </td>
            <td class="cell">
               Manufactufacturer
            </td>
            <td class="cell">
               Length (M)
            </td>
         </tr>
         <% } %> <%--RowFirst--%>
         <tr class='<%= trrow %>' style="padding: 10px 0px; line-height: 30px">
            <td style="padding: 10px 5px; line-height: 30px">
               <%: Html.DisplayFor(modelItem => item._Itemno) %>
            </td>
            <td style="padding: 10px 5px;">
               <%: Html.DisplayFor(modelItem => item._Topcrdcd) %>
            </td>
            <td style="padding: 10px 5px;">
               <%: Html.DisplayFor(modelItem => item._Manufc) %>
            </td>
            <td style="padding: 10px 5px; text-align: right;">
               <%: Html.DisplayFor(modelItem => item._HLength) %>
            </td>
         </tr>
         <% }   %>  <%--For--%>
      </table>
   </div>
   
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="ScriptsSection" runat="server">
   <style type="text/css">
      .fontTB
      {
         font-size: 18pt !important;
      }
      
      input[type="button"]
      {
         font-size: 24px !important;
         width: 300px;
         height: 75px;
         margin: 25px;
      }
      .actived
      {
         background-color: #20B2AA !important;
         color: White;
      }
   </style>


<% if (false)
{ %>
<script src="../../Scripts/jquery-1.7.2.js" type="text/javascript"></script>
<% } %>
   

   <script type="text/javascript">
      $(function () {
         $("#was").click(function () {
            var url = '<%= Url.Action("WASTE") %>';
            window.location = url;
         });
         $("#card").click(function () {
            var url = '<%= Url.Action("Get_CARD") %>';
            url = url + '?code=' + $("#topc").html();
            
            window.location = url;
         });

      });
   </script>

</asp:Content>
